home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / Collections$SynchronizedMap.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  3.4 KB  |  138 lines

  1. package java.util;
  2.  
  3. import java.io.IOException;
  4. import java.io.ObjectOutputStream;
  5. import java.io.Serializable;
  6.  
  7. class Collections$SynchronizedMap<K, V> implements Map<K, V>, Serializable {
  8.    private static final long serialVersionUID = 1978198479659022715L;
  9.    // $FF: renamed from: m java.util.Map
  10.    private final Map<K, V> field_0;
  11.    final Object mutex;
  12.    private transient Set<K> keySet = null;
  13.    private transient Set<Map.Entry<K, V>> entrySet = null;
  14.    private transient Collection<V> values = null;
  15.  
  16.    Collections$SynchronizedMap(Map<K, V> var1) {
  17.       if (var1 == null) {
  18.          throw new NullPointerException();
  19.       } else {
  20.          this.field_0 = var1;
  21.          this.mutex = this;
  22.       }
  23.    }
  24.  
  25.    Collections$SynchronizedMap(Map<K, V> var1, Object var2) {
  26.       this.field_0 = var1;
  27.       this.mutex = var2;
  28.    }
  29.  
  30.    public int size() {
  31.       synchronized(this.mutex) {
  32.          return this.field_0.size();
  33.       }
  34.    }
  35.  
  36.    public boolean isEmpty() {
  37.       synchronized(this.mutex) {
  38.          return this.field_0.isEmpty();
  39.       }
  40.    }
  41.  
  42.    public boolean containsKey(Object var1) {
  43.       synchronized(this.mutex) {
  44.          return this.field_0.containsKey(var1);
  45.       }
  46.    }
  47.  
  48.    public boolean containsValue(Object var1) {
  49.       synchronized(this.mutex) {
  50.          return this.field_0.containsValue(var1);
  51.       }
  52.    }
  53.  
  54.    public V get(Object var1) {
  55.       synchronized(this.mutex) {
  56.          return (V)this.field_0.get(var1);
  57.       }
  58.    }
  59.  
  60.    public V put(K var1, V var2) {
  61.       synchronized(this.mutex) {
  62.          return (V)this.field_0.put(var1, var2);
  63.       }
  64.    }
  65.  
  66.    public V remove(Object var1) {
  67.       synchronized(this.mutex) {
  68.          return (V)this.field_0.remove(var1);
  69.       }
  70.    }
  71.  
  72.    public void putAll(Map<? extends K, ? extends V> var1) {
  73.       synchronized(this.mutex) {
  74.          this.field_0.putAll(var1);
  75.       }
  76.    }
  77.  
  78.    public void clear() {
  79.       synchronized(this.mutex) {
  80.          this.field_0.clear();
  81.       }
  82.    }
  83.  
  84.    public Set<K> keySet() {
  85.       synchronized(this.mutex) {
  86.          if (this.keySet == null) {
  87.             this.keySet = new Collections.SynchronizedSet(this.field_0.keySet(), this.mutex);
  88.          }
  89.  
  90.          return this.keySet;
  91.       }
  92.    }
  93.  
  94.    public Set<Map.Entry<K, V>> entrySet() {
  95.       synchronized(this.mutex) {
  96.          if (this.entrySet == null) {
  97.             this.entrySet = new Collections.SynchronizedSet(this.field_0.entrySet(), this.mutex);
  98.          }
  99.  
  100.          return this.entrySet;
  101.       }
  102.    }
  103.  
  104.    public Collection<V> values() {
  105.       synchronized(this.mutex) {
  106.          if (this.values == null) {
  107.             this.values = new Collections.SynchronizedCollection(this.field_0.values(), this.mutex);
  108.          }
  109.  
  110.          return this.values;
  111.       }
  112.    }
  113.  
  114.    public boolean equals(Object var1) {
  115.       synchronized(this.mutex) {
  116.          return this.field_0.equals(var1);
  117.       }
  118.    }
  119.  
  120.    public int hashCode() {
  121.       synchronized(this.mutex) {
  122.          return this.field_0.hashCode();
  123.       }
  124.    }
  125.  
  126.    public String toString() {
  127.       synchronized(this.mutex) {
  128.          return this.field_0.toString();
  129.       }
  130.    }
  131.  
  132.    private void writeObject(ObjectOutputStream var1) throws IOException {
  133.       synchronized(this.mutex) {
  134.          var1.defaultWriteObject();
  135.       }
  136.    }
  137. }
  138.